﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevTools.BinDeleter.Components;

namespace DevTools.BinDeleter.Controls
{
    public partial class ResultView : UserControl
    {
        public ResultView()
        {
            InitializeComponent();
        }

        protected override void OnLoad(EventArgs e)
        {
            Deleter.Instance.Deleted += Deleter_Deleted;
            Deleter.Instance.FoldersLoaded += Deleter_FoldersLoaded;

            base.OnLoad(e);
        }

        private void Deleter_FoldersLoaded(object sender, Deleter.FoldersLoadedEventArgs e)
        {
            bdsFolderInfo.DataSource = e.Folders;
        }

        private void Deleter_Deleted(object sender, EventArgs e)
        {
            dgvList.Refresh();
        }
    }
}
